/*! \file bar.h	
	This is the header file for bar.cpp
	
	This contains the Bar class
*/

#ifndef GUI_BAR_H
#define GUI_BAR_H

#include <iostream>
#include <sstream> // for turning numbers into strings
#include "component.h"
#include "guiclass.h"

using namespace std;

/**
	\class Bar

	This represents a progress bar (really any kind of bar that can be filled)

*/
class Bar : public Component {
private:
	float percentFilled;
	Color lowColor;
	Color highColor;
	bool vertical;
	bool displayPercent;
public:
	Bar( Component* parent );
	void setColors( Color lowColor, Color highColor );
	void setPercentageFilled( float p ); // 0.0f - 1.0f
	void addPercentageFilled( float a );
	float getPercentageFilled();
	void setOrientation( bool vertical );
	void setDisplayPercent( bool show = true );
	/**
	* As usual, this will just call setSize
	*/
	//~ void setWidth( int newW );
		
	/**
	* This just calls setSize
	*/
	//~ void setHeight( int newH );
		
	//~ void setSize( int newW, int newH );
	virtual bool canHaveFocus() { return false;} 
	void update() { }
	void draw();
	
};
#endif
